Graceful recovery of a multicast-enabled switch

ABSTRACT

One embodiment of the present invention provides a switch. The switch includes a processor, a storage device, a multicast management module, and a graceful recovery module. The multicast management module participates in a multicast tree of a multicast group. The graceful recovery module determines a recovery event and constructs a message indicating the recovery event for a second switch. The switch and the second switch belong to a first virtual local area network (VLAN). The graceful recovery module then identifies a completion notification message from the second switch indicating a completion of replaying multicast information stored in the second switch and includes multicast information received from the second switch in a local multicast database.

RELATED APPLICATION

This application claims the benefit of U.S. Provisional Application No. 62/199,931, Attorney Docket Number BRCD-3399.0.1.US.PSP, titled “PIM Failover Fast Recovery,” by inventor Indranil Bhattacharya, filed 31 Jul. 2015, the disclosure of which is incorporated by reference herein.

BACKGROUND

Field

The present disclosure relates to network management. More specifically, the present disclosure relates to a method and system for efficient failover in a multicast distribution tree.

Related Art

The exponential growth of the Internet has made it a popular delivery medium for multimedia applications, such as video on demand and television. Such applications have brought with them an increasing demand for bandwidth. As a result, equipment vendors race to build larger and faster switches with versatile capabilities, such as multicasting, to move more traffic efficiently. However, the size of a switch cannot grow infinitely. It is limited by physical space, power consumption, and design complexity, to name a few factors. Furthermore, switches with higher capability are usually more complex and expensive. More importantly, because an overly large and complex system often does not provide economy of scale, simply increasing the size and capability of a switch may prove economically unviable due to the increased per-port cost.

One way to meet this challenge is to interconnect a number of switches in a multicast tree to support a large number of multicast users of a multicast group. When such a switch goes through a recovery (e.g., from a failure), the switch reconciles the local multicast states. Usually, for reconciliation, the switch relies on the neighbor switches of the multicast tree to send the multicast states (e.g., the join messages for the multicast group). However, this reconciliation procedure is not deterministic because the switch is unaware of whether a neighbor switch has completed sending its states. Hence, the switch usually waits for a finite period of time to completely rebuild its local multicast states, leading to delay and reduced performance.

While multicast brings many desirable features to a network, some issues remain unsolved in efficient recovery in a multicast network.

SUMMARY

One embodiment of the present invention provides a switch. The switch includes a processor, a storage device, a multicast management module, and a graceful recovery module. The multicast management module participates in a multicast tree of a multicast group. The graceful recovery module determines a recovery event and constructs a message indicating the recovery event for a second switch. The switch and the second switch belong to a first virtual local area network (VLAN). The graceful recovery module then identifies a completion notification message from the second switch indicating a completion of replaying multicast information stored in the second switch and includes multicast information received from the second switch in a local multicast database.

In a variation on this embodiment, the graceful recovery module identifies a completion notification message from a respective neighbor switch in the first VLAN. The switch also comprises a forwarding module, which synchronizes forwarding information in the local multicast database with the forwarding hardware of the switch.

In a variation on this embodiment, if the graceful recovery module has identified the completion notification message from the second switch, the graceful recovery module terminates a timer for the second switch. The timer represents a period of time the switch waits for multicast information from the second switch.

In a variation on this embodiment, the graceful recovery module constructs a second message indicating the recovery event for a third switch. The switch and the third switch belong to a second VLAN distinct from a first VLAN.

In a variation on this embodiment, the graceful recovery module constructs a multicast notification message for the second switch. This multicast notification message indicates that the switch supports advanced multicast options.

In a variation on this embodiment, the graceful recovery module constructs a graceful recovery notification message for the second switch. The graceful recovery notification message indicates that the switch supports construction and identification of a completion notification message.

In a variation on this embodiment, the completion notification message is a Protocol-Independent Multicast (PIM) hello message, which includes an option type value indicating that the hello message is the completion notification message.

In a variation on this embodiment, the completion notification message includes a switch identifier of the switch as a target identifier distinct from a destination address of the completion notification message.

In a variation on this embodiment, the switch is a standby switch for a remote switch, and the recovery event is an unavailability of the remote switch.

In a further variation, the switch includes a high availability module, which obtains neighbor state information from one or more synchronization messages from the remote switch. The neighbor state information indicates whether a neighbor switch supports construction and identification of a completion notification message.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1A illustrates an exemplary graceful recovery of a switch in a multicast distribution tree, in accordance with an embodiment of the present invention.

FIG. 1B illustrates an exemplary graceful recovery of a switch with high availability support in a multicast distribution tree, in accordance with an embodiment of the present invention.

FIG. 1C illustrates an exemplary graceful recovery of a switch with high-availability support in a plurality of multicast distribution trees, in accordance with an embodiment of the present invention.

FIG. 2 illustrates an exemplary process of graceful recovery of a switch with high-availability support in a multicast distribution tree, in accordance with an embodiment of the present invention.

FIG. 3A illustrates an exemplary message indicating advanced multicast options support for a switch, in accordance with an embodiment of the present invention.

FIG. 3B illustrates an exemplary message indicating graceful recovery support for a switch, in accordance with an embodiment of the present invention.

FIG. 3C illustrates an exemplary message indicating completion of a graceful recovery, in accordance with an embodiment of the present invention.

FIG. 4 presents a flowchart illustrating the process of a switch notifying graceful recovery support to neighbor switches in a multicast distribution tree, in accordance with an embodiment of the present invention.

FIG. 5A presents a flowchart illustrating the process of a switch providing multicast states to a neighbor switch in a multicast distribution tree for facilitating a graceful recovery, in accordance with an embodiment of the present invention.

FIG. 5B presents a flowchart illustrating the process of a switch reconciling multicast states from neighbor switches in a multicast distribution tree for a graceful recovery, in accordance with an embodiment of the present invention.

FIG. 6 illustrates an exemplary switch supporting graceful recovery in a multicast distribution tree, in accordance with an embodiment of the present invention.

In the figures, like reference numerals refer to the same figure elements.

DETAILED DESCRIPTION

The following description is presented to enable any person skilled in the art to make and use the invention, and is provided in the context of a particular application and its requirements. Various modifications to the disclosed embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the present invention. Thus, the present invention is not limited to the embodiments shown, but is to be accorded the widest scope consistent with the claims.

Overview

In embodiments of the present invention, the problem of efficiently recovering a switch participating in a multicast distribution tree is solved by neighbor switches of the switch notifying the switch regarding completion of reconciliation. The recovering switch can participate in the multicast tree using Protocol Independent Multicast (PIM) and can be referred to as a multicast-enabled switch. Neighbor switches of the switch include the multicast-enabled switches that are in a same local area network (LAN) or virtual LAN (VLAN).

With existing technologies, when the switch becomes unavailable (e.g., due to a failure, reboot, or update), after recovery, the switch reconciles with the multicast states of the neighbor switches. The multicast states comprise PIM Multicast Cache (MCACHE) states, which includes route information associated with the source and multicast group (i.e., the multicast routing states). To reconcile multicast states, neighbor switches replay their MCACHE and send join/prune messages associated with the multicast routing states in their respective MCACHE to the recovering switch. For example, the recovering switch receives join/prune messages for which the recovering switch is an upstream switch. In this way, the recovering switch receives information associated with any new or updated multicast state associated with an MCACHE entry of a neighbor switch.

However, this process is not deterministic since the switch cannot determine whether a neighbor switch has completed replaying its MCACHE. Hence, the switch waits for a period of time to determine that a neighbor switch has completed replaying its MCACHE. Upon determining this for a respective neighbor switch, the switch completes rebuilding its local MCACHE and synchronizes the entries with underlying forwarding hardware. This leads to delay in the reconciliation process.

To solve this problem, the multicast-enabled switches in a network implement a graceful recovery process. During operation, these switches notify each other (e.g., by constructing and sending a notification message) by indicating that they support advanced multicast options and graceful recovery. In this way, the switches discover each other's support of graceful discovery. It should be noted that the advanced multicast options allow implementation of multicast features in addition to the graceful recovery. In response to a recovery event for a switch (e.g., when a switch recovers from unavailability), neighbor switches are aware of its graceful recovery support. Hence, when a neighbor switch completes replaying its MCACHE for the recovering switch, the neighbor switch sends an explicit notification message to the recovering switch indicating the completion. In this way, the recovering switch determines the completion of the reconciliation with a respective neighbor, and facilitates efficient and graceful recovery for the switch.

In some embodiments, a multicast-enabled switch is a member switch in a fabric switch. In a fabric switch, any number of switches coupled in an arbitrary topology may logically operate as a single switch. The fabric switch can be an Ethernet fabric switch or a virtual cluster switch (VCS), which can operate as a single Ethernet switch. Any member switch may join or leave the fabric switch in “plug-and-play” mode without any manual configuration. In some embodiments, a respective switch in the fabric switch is a Transparent Interconnection of Lots of Links (TRILL) routing bridge (RBridge). In some further embodiments, a respective switch in the fabric switch is an Internet Protocol (IP) routing-capable switch (e.g., an IP router).

It should be noted that a fabric switch is not the same as conventional switch stacking. In switch stacking, multiple switches are interconnected at a common location (often within the same rack), based on a particular topology, and manually configured in a particular way. These stacked switches typically share a common address, e.g., an IP address, so they can be addressed as a single switch externally. Furthermore, switch stacking requires a significant amount of manual configuration of the ports and inter-switch links. The need for manual configuration prohibits switch stacking from being a viable option in building a large-scale switching system. The topology restriction imposed by switch stacking also limits the number of switches that can be stacked. This is because it is very difficult, if not impossible, to design a stack topology that allows the overall switch bandwidth to scale adequately with the number of switch units.

In contrast, a fabric switch can include an arbitrary number of switches with individual addresses, can be based on an arbitrary topology, and does not require extensive manual configuration. The switches can reside in the same location, or be distributed over different locations. These features overcome the inherent limitations of switch stacking and make it possible to build a large “switch farm,” which can be treated as a single, logical switch. Due to the automatic configuration capabilities of the fabric switch, an individual physical switch can dynamically join or leave the fabric switch without disrupting services to the rest of the network.

Furthermore, the automatic and dynamic configurability of the fabric switch allows a network operator to build its switching system in a distributed and “pay-as-you-grow” fashion without sacrificing scalability. The fabric switch's ability to respond to changing network conditions makes it an ideal solution in a virtual computing environment, where network loads often change with time.

It should also be noted that a fabric switch is distinct from a VLAN. A fabric switch can accommodate a plurality of VLANs. A VLAN is typically identified by a VLAN tag. In contrast, the fabric switch is identified by a fabric identifier (e.g., a VCS identifier), which is assigned to the fabric switch. A respective member switch of the fabric switch is associated with the fabric identifier. Furthermore, when a member switch of a fabric switch learns a media access control (MAC) address of an end device (e.g., via layer-2 MAC address learning), the member switch generates a notification message, includes the learned MAC address in the payload of the notification message, and sends the notification message to all other member switches of the fabric switch. In this way, a learned MAC address is shared with a respective member switch of the fabric switch.

In this disclosure, the term “fabric switch” refers to a number of interconnected physical switches which form a single, scalable logical switch. These physical switches are referred to as member switches of the fabric switch. In a fabric switch, any number of switches can be connected in an arbitrary topology, and the entire group of switches functions together as one single, logical switch. This feature makes it possible to use many smaller, inexpensive switches to construct a large fabric switch, which can be viewed as a single logical switch externally. Although the present disclosure is presented using examples based on a fabric switch, embodiments of the present invention are not limited to a fabric switch. Embodiments of the present invention are relevant to any computing device that includes a plurality of devices operating as a single device.

Although the present disclosure is presented using examples based on an encapsulation protocol, embodiments of the present invention are not limited to networks defined using one particular encapsulation protocol associated with a particular Open System Interconnection Reference Model (OSI Reference Model) layer. For example, embodiments of the present invention can also be applied to a multi-protocol label switching (MPLS) network. In this disclosure, the term “encapsulation” is used in a generic sense, and can refer to encapsulation in any networking layer, sub-layer, or a combination of networking layers.

The term “end device” can refer to any device external to a network (e.g., which does not perform forwarding in that network). Examples of an end device include, but are not limited to, a physical or virtual machine, a conventional layer-2 switch, a layer-3 router, or any other type of network device. Additionally, an end device can be coupled to other switches or hosts further away from a layer-2 or layer-3 network. An end device can also be an aggregation point for a number of network devices to enter the network. An end device hosting one or more virtual machines can be referred to as a host machine. In this disclosure, the terms “end device” and “host machine” are used interchangeably.

The term “message” refers to a group of bits that can be transported together across a network. “Message” should not be interpreted as limiting embodiments of the present invention to a particular network layer. “Message” can be replaced by other terminologies referring to a group of bits, such as “packet,” “frame,” “cell,” or “datagram.”

The term “switch” is used in a generic sense, and can refer to any standalone or fabric switch operating in any network layer. “Switch” can be a physical device or software running on a computing device. “Switch” should not be interpreted as limiting embodiments of the present invention to layer-2 networks. Any device that can forward traffic to an external device or another switch can be referred to as a “switch.” Examples of a “switch” include, but are not limited to, a layer-2 switch, a layer-3 router, a TRILL RBridge, or a fabric switch comprising a plurality of similar or heterogeneous smaller physical switches.

The term “RBridge” refers to routing bridges, which are bridges implementing the TRILL protocol as described in Internet Engineering Task Force (IETF) Request for Comments (RFC) “Routing Bridges (RBridges): Base Protocol Specification,” available at http://tools.ietf.org/html/rfc6325, which is incorporated by reference herein. Embodiments of the present invention are not limited to application among RBridges. Other types of switches, routers, and forwarders can also be used.

The term “edge port” refers to a port on a network which exchanges data frames with a device outside of the network (i.e., an edge port is not used for exchanging data frames with another member switch of a network). The term “inter-switch port” refers to a port which sends/receives data frames among member switches of the network. The terms “interface” and “port” are used interchangeably.

The term “switch identifier” refers to a group of bits that can be used to identify a switch. Examples of a switch identifier include, but are not limited to, a media access control (MAC) address, an Internet Protocol (IP) address, and an RBridge identifier. Note that the TRILL standard uses “RBridge ID” (RBridge identifier) to denote a 48-bit intermediate-system-to-intermediate-system (IS-IS) System ID assigned to an RBridge, and “RBridge nickname” to denote a 16-bit value that serves as an abbreviation for the “RBridge ID.” In this disclosure, “switch identifier” is used as a generic term, is not limited to any bit format, and can refer to any format that can identify a switch. The term “RBridge identifier” is also used in a generic sense, is not limited to any bit format, and can refer to “RBridge ID,” “RBridge nickname,” or any other format that can identify an RBridge.

The term “multicast tree” is used in a generic sense, and can refer to any topology associated with any “multicast protocol.” A “multicast protocol” can refer to any protocol that can be used by devices in a network to distribute multicast data and/or control information. Examples of multicast protocol include, but are not limited to, Internet Group Management Protocol (IGMP), Multicast Listener Discovery (MLD) protocol, and Protocol-Independent Multicast (PIM). The term “multicast distribution tree” is also used in a generic sense, and can refer to any tree topology that can be used to distribute multicast data and/or control information in a network.

Network Architecture

FIG. 1A illustrates an exemplary graceful recovery of a switch in a multicast distribution tree, in accordance with an embodiment of the present invention. As illustrated in FIG. 1A, a multicast tree 100 includes multicast-enabled switches 101, 102, 103, 105, and 106. These switches can be in a physical local area network (LAN) or a virtual LAN (VLAN). In some embodiments, one or more switches in multicast tree 100 can be in a fabric switch and can appear as a single logical switch to all other neighbor switches. End devices 111 and 112 are coupled to switch 102, and end devices 113 and 114 are coupled to switches 105 and 106, respectively. These end devices have joined the multicast group of multicast tree 100 and receive multicast data via multicast tree 100. A source 130, which can be an end device, for the multicast group is coupled to switch 101.

During operation, switch 105 receives a join request from end device 113 for the multicast group. Switch 105 creates an entry comprising information associated with the multicast group in its local MCACHE (which can also be referred to as a multicast database). Information in the entry includes, but is not limited to, one or more of: multicast family, multicast group address (e.g., an IP address), a source address for the multicast group, an upstream interface, one or more downstream interfaces, rejected downstream interfaces, multicast session information, statistics, next-hop identifier, an upstream protocol (e.g., PIM), a current multicast state (e.g., indicating an active route), a forwarding state, a cache lifetime (e.g., a timeout value), and a number of incorrect incoming interface notifications.

Suppose that switch 103 becomes unavailable (e.g., due to a failure, reboot, or update). With existing technologies, switch 103 reconciles with the multicast states of its neighbor switches 101, 102, 105, and 106. To reconcile multicast states, switch 103 sends a “hello” message with a new generation identifier to the neighbor switches. The generation identifier is a value (e.g., a randomly generated value), which is regenerated each time a multicast forwarding is started or restarted from an interface (e.g., when a switch restarts). A switch maintains the current generation identifier for its respective neighbor switch. As a result, when the switch receives a “hello” message with a new generation identifier (i.e., a different value than the currently stored value), the switch determines that the sending switch has rebooted.

Hence, upon receiving the “hello” message from switch 103, the neighbor switches replay their MCACHE entries and send corresponding join/prune messages associated with the entries to switch 103. In this way, switch 103 receives information associated with any new or updated multicast state associated with an MCACHE entry of a neighbor switch. For example, downstream switch 105 might have created a new multicast state or chosen a new reverse path forwarding (RPF) route for an existing MCACHE entry. Switch 103 can receive this updated information based on the reconciliation process.

However, this process is not deterministic since switch 103 cannot determine whether a neighbor switch has completed replaying its MCACHE. For example, switch 103 cannot determine whether switch 105 has completed replaying its MCACHE. Hence, switch 103, upon sending the “hello” message to switch 105, initiates a timer for switch 105 to wait for a period of time. Switch 103 waits till the timer expires to determine that switch 105 has completed replaying its MCACHE. In the same way, switch 103 maintains a timer for switches 101, 102, and 106, and waits for each of these timers to expire.

Upon determining that switches 101, 102, 105, and 106 have completed replaying their respective MCACHE entries, switch 103 determines that it has received necessary information to rebuild its local MCACHE. Switch 103 then completes rebuilding its local MCACHE based on the received join/prune messages from neighbor switches. Switch 103 synchronizes the entries in the local MCACHE with underlying forwarding hardware (e.g., a content addressable memory (CAM)). Since switch 103 waits for the timer for a respective neighbor switch to expire before updating its forwarding hardware, the reconciliation process suffers delay and becomes inefficient.

To solve this problem, multicast-enabled switches 101, 102, 103, 105, and 106 implement a graceful recovery process. During operation, these switches construct a notification message indicating that they support advanced multicast options and send the notification message to each other. In this way, a respective switch determines that its neighbor switches support advanced multicast options, which allow implementation of multicast features, such as the graceful recovery. These switches construct another notification message indicating that they, among advanced multicast options, support graceful recovery. In this way, switches 101, 102, 103, 105, and 106 discover each other's support of graceful discovery.

When switch 103 detects a recovery event, switch 103 sends a “hello” message 142 with a new generation identifier to its neighbor switches 101, 102, 105, and 106 (i.e., the switches in the same VLAN). If switch 103 is a standalone switch, which does not have a standby switch, the recovery event can be a reboot (e.g., a recovery from an unavailability) or a live software update (e.g., an In-Service Software Upgrade (ISSU)). Upon receiving message 142, the neighbor switches determine that a recovery has been triggered for switch 103. The neighbor switches determine that, based on previously received notification messages, switch 103 supports graceful recovery. A neighbor switch, such as switch 105, starts replaying its MCACHE for switch 103, and sends one or more join/prune messages 144 (denoted with a multiline arrow) associated with the MCACHE entries (e.g., join/prune messages for multicast groups specified in the MCACHE of switch 105).

Since switches 103 and 105 support graceful recovery, upon completing sending join/prune messages 144 to switch 103, switch 105 sends a graceful recovery completion message 146 (which is also referred to graceful recovery completion notification message). When switch 103 receives message 146, switch 103 determines the completion of the reconciliation with switch 105 and terminates the timer for switch 105. In the same way, other neighbor switches replay their respective MCACHE for switch 103 and, upon completion, send a graceful recovery completion message. In some embodiments, only the downstream neighbor switches of switch 103 replay their respective MCACHEs. Because switch 103 has identified the neighbor switches with graceful recovery support, switch 103 waits for the graceful recovery completion message from a respective identified neighbor switch. When switch 103 receives the graceful recovery completion messages from all its neighbor switches, switch 103 determines that the reconciliation is complete. Switch 103 then completes constructing its local MCACHE based on received information and synchronizes its forwarding information with the forwarding hardware of switch 103.

FIG. 1B illustrates an exemplary graceful recovery of a switch with high availability support in a multicast distribution tree, in accordance with an embodiment of the present invention. In this example, switch 103 has a standby switch 104 and forms a switch system 120 with high availability support. In some embodiments, the high availability support is provided by a high availability protocol. Examples of a high availability protocol include, but are not limited to, Virtual Router Redundancy Protocol (VRRP), Virtual Switch Redundancy Protocol (VSRP), Common Address Redundancy Protocol (CARP), and Hot Standby Router Protocol (HSRP). In this example, other switches in tree 100 can also have high availability support (not shown).

In some embodiments, switches 103 and 104 are associated with a virtual switch and have a virtual switch identifier (e.g., a virtual IP address). The active switch receives and forwards packets with the virtual IP address. When the active switch goes through a failover, the virtual IP address becomes associated with the standby switch. In this example, switch 103 is the active switch and switch 104 is the standby switch. Switch 104 can remain inactive and becomes active if switch 103 becomes unavailable. To ensure a quick failover, switch 103 synchronizes its neighbor states with switch 104. For example, when switch 103 receives advanced multicast option and graceful recovery support notifications from neighbor switches, switch 103 synchronizes that information with switch 104. As a result, switch 104 is also aware of the neighbor switches with graceful recovery support.

When switch 104 detects a recovery event (e.g., a failure for switch 103), switch 104 sends a “hello” message 142 with a new generation identifier to its neighbor switches 101, 102, 105, and 106. Switch 104 can use its virtual IP address as the source address of message 142. As a result, switches 101, 102, 105, and 106 determine that the same switch (i.e., switch 103) is rebooting. Hence, upon receiving message 142, the neighbor switches determine that a recovery has been triggered for switch system 120. A neighbor switch, such as switch 105, starts replaying its MCACHE for switch 104, and sends one or more join/prune messages 144 (denoted with a multiline arrow) associated with the MCACHE entries. Upon completion of reconciliation, switch 105 sends a graceful recovery completion message 146.

When switch 104 receives message 146, switch 104 determines the completion of the reconciliation with switch 105 and terminates the timer for switch 105. In the same way, other neighbor switches replay their respective MCACHEs for switch 104 and, upon completion, send a graceful recovery completion message. Because switch 103 has synchronized its member states with switch 104, switch 104 waits for the graceful recovery completion message from a respective identified neighbor switch. When switch 104 receives the graceful recovery completion messages from all its neighbor switches, switch 104 determines that the reconciliation is complete. Switch 104 then completes constructing its local MCACHE based on received information and synchronizes its forwarding information with the forwarding hardware of switch 104.

FIG. 1C illustrates an exemplary graceful recovery of a switch with high-availability support in a plurality of multicast distribution trees, in accordance with an embodiment of the present invention. In this example, switch system 120 with high availability participates in VLANs 152 and 154. Suppose that the members of multicast tree 100 of FIG. 1B are in VLAN 152. On the other hand, switches 101, 102, 103, 104, 106, and 107 are in VLAN 154. As a result, when switch 104 detects a recovery event, switch 104 sends a separate “hello” message 162 with a new generation identifier to its neighbor switches in VLAN 154. As a result, a switch in both VLANs 152 and 154 can receive multiple hello messages from switch 104.

Upon receiving message 162, the neighbor switches in VLAN 154 determine that a recovery has been triggered for switch system 120. A neighbor switch, such as switch 107, starts replaying its MCACHE for switch 104, and sends one or more join/prune messages 164 (denoted with a multiline arrow) associated with the MCACHE entries. Upon completion of reconciliation, switch 107 sends a graceful recovery completion message 166. When switch 104 receives the graceful recovery completion messages from all its neighbor switches in VLAN 154, switch 104 determines that the reconciliation is complete. Switch 104 then completes constructing its local MCACHE based on received information and synchronizes its forwarding information with the forwarding hardware of switch 104.

Exemplary Communication

FIG. 2 illustrates an exemplary process of graceful recovery of a switch with high-availability support in a multicast distribution tree, in accordance with an embodiment of the present invention. During operation, active switch 103 of switch system 120, which also includes standby switch 104, sends an advanced multicast options support notification message to a neighbor switch 105 (operation 212). Switch 103 also sends a graceful recovery support notification message to switch 105 (operation 214). In the same way, switch 105 sends an advanced multicast options support notification message (operation 212) and a graceful recovery support notification message (operation 214) to switch 103. This allows switches 103 and 105 to discover their neighbor switches with graceful recovery support (operation 216).

Switch 103 synchronizes its neighbor states with switch 104 (operation 218), thereby allowing switch 104 to discover the neighbor switches with graceful recovery support. Suppose that switch 104 detects a failover (or an ISSU or a reboot) for switch 103 (operation 220). Upon detecting the failover, switch 104 sends a hello message with a new generation identifier to its neighbor switches, such as switch 105 (operation 222). If switch 103 is a standalone switch (i.e., does not have switch 104 as a standby switch), switch 103 does not synchronize its neighbor states with switch 104. Switch 103 then detects a local recovery event (e.g., an ISSU or a reboot) and sends the hello message to the neighbor switches.

Switch 105, in response, replays its MCACHE and sends the join/prune messages associated with the entries in the MCACHE (operation 224). Upon completing replaying its MCACHE, switch 105 sends a graceful recovery completion message to switch 104 (operation 226). When switch 104 receives a graceful recovery completion message from all neighbor switches (operation 228), switch 104 constructs the local MCACHE based on received messages and synchronizes with the local forwarding hardware (operation 230).

Message Formats

FIG. 3A illustrates an exemplary message indicating advanced multicast options support for a switch, in accordance with an embodiment of the present invention. In this example, an advanced multicast options support notification message 302 indicates whether a switch supports advanced multicast options. In some embodiments, message 302 is a PIM hello message with a predetermined option value. The message is then a multicast message and can be sent via a corresponding multicast tree. Message 302 can include message version 312 (e.g., a PIM version), a message type 314 (e.g., a “hello” message), and a checksum 318. Message 302 can also include a set of reserved bits 316. Message 302 includes an option type 320 indicating that message 302 is an advanced multicast options support notification message.

Message 302 also includes an option length 322, which indicates a length for an option value 324. In some embodiments, option type 320 uses an available value for a PIM hello message (e.g., 65001). Option value 324 includes a device key, which indicates whether the local device (e.g., switches 103 and 105 in FIG. 2) supports advanced multicast options. For example, the device key can be an organizationally unique identifier (OUI) associated with a device manufacturer, indicating that the manufacturer supports advanced multicast options. Under such circumstances, option length 322 can be 24, which is the length of an OUI in a MAC address. If the MAC address is used as a device key, option length 322 can be 48. In some embodiments, the device key is a key obtained from a key server (e.g., a license key obtained from a license server).

FIG. 3B illustrates an exemplary message indicating graceful recovery support for a switch, in accordance with an embodiment of the present invention. In this example, a graceful recovery support notification message 304 indicates whether a switch supports graceful recovery. In some embodiments, message 304 is a PIM hello message with a predetermined option value. The message is then a multicast message and can be sent via a corresponding multicast tree. Similar to message 302, message 304 includes a message version 312, a message type 314, and a checksum 318. Message 304 can also include a set of reserved bits 316.

Message 304 includes an option type 330 indicating that message 304 is a graceful recovery support notification message. Message 304 also includes an option length 332, which indicates a length for an option value 334. In some embodiments, option type 330 uses an available value for a PIM hello message (e.g., 65002). Since option type 330 is sufficient to indicate support for graceful recovery, option value 334 can be empty. Under such circumstances, option length 332 can be zero.

FIG. 3C illustrates an exemplary message indicating completion of a graceful recovery, in accordance with an embodiment of the present invention. In this example, a graceful recovery completion notification message 306 indicates whether a switch has completed playing its local MCACHE for a graceful recovery. In some embodiments, message 306 is a PIM hello message with a predetermined option value. The message is then a multicast message and can be sent via a corresponding multicast tree. Similar to message 302, message 306 includes a message version 312, a message type 314, a checksum 318, and a set of reserved bits 316. Message 306 can also include option type 320, option length 322, and option value 324. This allows message 306 to indicate that message 306 is part of the advanced multicast options. Furthermore, message 306 can also include option type 330, option length 332, and option value 334. This allows message 306 to indicate that message 306 is part of the graceful recovery.

Message 306 includes an option type 340 indicating that message 306 is a graceful recovery completion notification message. Message 306 also includes an option length 342, which indicates a length for an option value 344. In some embodiments, option type 340 uses an available value for a PIM hello message (e.g., 65003). Option value 344 includes a target identifier, which corresponds to the identifier of the recovering switch. It should be noted that, since message 306 is a multicast message, the target identifier is distinct from the destination address of message 306.

In the example in FIG. 1A, switch 105 includes the switch identifier of switch 103 as the target identifier in the option value 344 of message 146. In some embodiments, the target identifier is an IP address. Under such circumstances, option length 342 can be 32 or 128, which is the length of an IP address for IP versions 4 and 6, respectively. Since the message is a multicast message (e.g., a PIM hello message), switch 105 sends message 146 via the ports participating in a corresponding multicast tree. Neighbor switches 101, 102, 103, and 106 receive message 146 and check the target identifier in option value 344. However, only switch 103, whose identifier matches the target identifier, retrieves the message. Other neighbor switches determine that the message is not for them and discard the message.

Operations

FIG. 4 presents a flowchart illustrating the process of a switch notifying graceful recovery support to neighbor switches in a multicast distribution tree, in accordance with an embodiment of the present invention. During operation, the switch generates a notification message indicating that the local switch supports advanced multicast options (operation 402) and another notification message indicating that the local switch supports graceful recovery (operation 404). The switch determines egress ports corresponding to the neighbor switches in a respective VLAN (operation 406) and transmits the generated messages via the determined egress ports (operation 408). If the switch is in multiple VLANs, the switch generates and transmits the messages for each VLAN.

FIG. 5A presents a flowchart illustrating the process of a switch providing multicast states to a neighbor switch in a multicast distribution tree for facilitating a graceful recovery, in accordance with an embodiment of the present invention. During operation, the switch receives a hello message with a new generation identifier from a neighbor switch (operation 502). The switch then determines that the neighbor switch has rebooted; hence, the switch replays the local MCACHE and sends the corresponding join/prune messages to the neighbor switch (operation 504). These join/prune messages correspond to the respective multicast group specified in the MCACHE.

When the switch has finished replaying the MCACHE, the switch generates a graceful recovery completion message with the neighbor switch's identifier as the target identifier (operation 506). The switch then sends the graceful recovery completion message to the neighbor switch (operation 508). In some embodiments, the graceful recovery completion message is a PIM hello message. Since the message is a multicast message, the switch sends the message via the ports participating in a corresponding multicast tree. A respective neighbor switch receives this message. However, only the neighbor switch whose identifier matches the target identifier retrieves the message. Other neighbor switches determine that the message is not for them and discard the message.

FIG. 5B presents a flowchart illustrating the process of a switch reconciling multicast states from neighbor switches in a multicast distribution tree for a graceful recovery, in accordance with an embodiment of the present invention. During operation, the switch detects a discovery event (operation 552) and initiates a timer for the MCACHE replay for a respective neighbor switch (operation 554). The switch then generates a hello message with a new generation identifier (operation 556) and sends the hello message to the neighbor switches for a respective VLAN (operation 558). If the switch participates in a plurality of VLANs, the switch sends a hello message for the neighbors of a respective VLAN. As a result, a neighbor switch may receive a plurality of hello messages. The neighbor switch may respond to each hello message, or can consolidate the hello messages and/or responses.

The switch receives join/prune messages from a neighbor switch (operation 560) and checks whether the switch has received a graceful recovery completion message (operation 562). If not, the switch checks whether the timer for the neighbor has expired (operation 564). If the switch has not received a graceful recovery completion message and the timer has not expired, the switch continues to receive join/prune messages from the neighbor switch (operation 560). If the switch has received a graceful recovery completion message, the switch cancels the timer for the neighbor switch (operation 566). If the timer has expired (operation 564), the switch determines that the recovery has completed for that neighbor, which is equivalent of receiving the graceful recovery completion message.

If the timer has expired (operation 564) or upon canceling the timer for the neighbor switch (operation 566), the switch checks whether the switch has received a graceful recovery completion message from all neighbors in the VLAN (operation 568). If the switch has not received a graceful recovery completion message from all neighbors in the VLAN, the switch continues to receive join/prune messages from other neighbor switches (operation 560). If the switch has received a graceful recovery completion message from all neighbors in the VLAN, the switch determines that the reconciliation is complete for the VLAN (operation 570). The switch then constructs the local MCACHE and synchronizes the forwarding information with the forwarding hardware (operation 572). The switch checks whether the reconciliation is complete for all VLANs (operation 574). If not, the switch continues to receive join/prune messages from neighbor switches of other VLANs (operation 560).

Exemplary Switch

FIG. 6 illustrates an exemplary switch supporting graceful recovery in a multicast distribution tree, in accordance with an embodiment of the present invention. In this example, a switch 600 includes a general purpose processor 604, a memory 606, a number of communication ports 602, a packet processor 610, a multicast management module 630, a graceful recovery module 632, a forwarding module 620, and a storage device 650. Processor 604 executes instructions stored in memory 606 to facilitate graceful recovery. Packet processor 610 receives and processes packets received via communication ports 602.

During operation, multicast management module 630 participates in a multicast tree of a multicast group. Graceful recovery module 632 determines a recovery event and constructs a message indicating the recovery event for a neighbor switch in a same VLAN. Graceful recovery module 632 then identifies a completion notification message (e.g., graceful recovery completion notification message 306 in FIG. 3C) from the neighbor switch and includes multicast information received from the neighbor switch in a local multicast database. In some embodiments, the switch stores the local multicast database in storage device 650. When graceful recovery module 632 identifies a completion notification message from a respective neighbor switch in the VLAN, forwarding module 620 synchronizes forwarding information in the local multicast database with forwarding hardware 660 of switch 600. Forwarding hardware 660 can be a CAM.

Graceful recovery module 632 also initiates and terminates timers for the neighbor switches. Graceful recovery module 632 also constructs different messages indicating the recovery event for different VLANs. Graceful recovery module 632 further constructs multicast notification messages (e.g., an advanced multicast options support notification message 302 in FIG. 3A) and graceful recovery notification messages (e.g., a graceful recovery support notification message 304 in FIG. 3B). In some embodiments, switch 600 is a standby switch of a remote switch, as described in conjunction with FIG. 1B. Switch 600 then includes a high availability module 640, which obtains neighbor state information from one or more synchronization messages from the remote switch.

Note that the above-mentioned modules can be implemented in hardware as well as in software. In one embodiment, these modules can be embodied in computer-executable instructions stored in a memory which is coupled to one or more processors in switch 600. When executed, these instructions cause the processor(s) to perform the aforementioned functions.

In summary, embodiments of the present invention provide a switch and a method for a graceful recovery. In one embodiment, the switch includes a processor, a storage device, a multicast management module, and a graceful recovery module. The multicast management module participates in a multicast tree of a multicast group. The graceful recovery module determines a recovery event and constructs a message indicating the recovery event for a second switch. The switch and the second switch belong to a first virtual local area network (VLAN). The graceful recovery module then identifies a completion notification message from the second switch indicating a completion of replaying multicast information stored in the second switch and includes multicast information received from the second switch in a local multicast database.

The methods and processes described herein can be embodied as code and/or data, which can be stored in a computer-readable non-transitory storage medium. When a computer system reads and executes the code and/or data stored on the computer-readable non-transitory storage medium, the computer system performs the methods and processes embodied as data structures and code and stored within the medium.

The methods and processes described herein can be executed by and/or included in hardware modules or apparatus. These modules or apparatus may include, but are not limited to, an application-specific integrated circuit (ASIC) chip, a field-programmable gate array (FPGA), a dedicated or shared processor that executes a particular software module or a piece of code at a particular time, and/or other programmable-logic devices now known or later developed. When the hardware modules or apparatus are activated, they perform the methods and processes included within them.

The foregoing descriptions of embodiments of the present invention have been presented only for purposes of illustration and description. They are not intended to be exhaustive or to limit this disclosure. Accordingly, many modifications and variations will be apparent to practitioners skilled in the art. The scope of the present invention is defined by the appended claims. 

What is claimed is:
 1. A switch, comprising: a multicast management module configured to participate in a multicast tree of a multicast group; and a graceful recovery module configured to: in response to determining a recovery event, construct a message indicating the recovery event for a second switch, wherein the switch and the second switch belong to a first virtual local area network (VLAN); identify a completion notification message from the second switch indicating a completion of replaying multicast information stored in the second switch; and include multicast information received from the second switch in a local multicast database.
 2. The switch of claim 1, wherein the graceful recovery module is further configured to identify a completion notification message from a respective neighbor switch in the first VLAN; and wherein the switch further comprises a forwarding module configured to synchronize forwarding information in the local multicast database with a forwarding hardware of the switch.
 3. The switch of claim 1, wherein the graceful recovery module is configured to, in response to identifying the completion notification message from the second switch, terminate a timer for the second switch, wherein the timer represents a period of time the switch waits for multicast information from the second switch.
 4. The switch of claim 1, wherein the graceful recovery module is further configured to construct a second message indicating the recovery event for a third switch, wherein the switch and the third switch belong to a second VLAN distinct from a first VLAN.
 5. The switch of claim 1, wherein the graceful recovery module is further configured to construct for the second switch: a multicast notification message indicating that the switch supports advanced multicast options; and a graceful recovery notification message indicating that the switch supports construction and identification of a completion notification message.
 6. The switch of claim 1, wherein the completion notification message is a Protocol-Independent Multicast (PIM) hello message, wherein the hello message includes an option type value indicating that the hello message is the completion notification message.
 7. The switch of claim 1, wherein the completion notification message includes a switch identifier of the switch as a target identifier distinct from a destination address of the completion notification message.
 8. The switch of claim 1, wherein the switch is a standby switch for a remote switch, and wherein the recovery event is an unavailability of the remote switch.
 9. The switch of claim 8, wherein the switch further comprises a high availability module configured to obtain neighbor state information from one or more synchronization messages from the remote switch, wherein the neighbor identification of a completion notification message.
 10. A method, comprising: participating, by a switch, in a multicast tree of a multicast group; in response to determining a recovery event, constructing a message indicating the recovery event for a second switch, wherein the switch and the second switch belong to a first virtual local area network (VLAN); identifying a completion notification message from the second switch indicating a completion of replaying multicast information stored in the second switch; and including multicast information received from the second switch in a local multicast database.
 11. The method of claim 10, further comprising: identifying a completion notification message from a respective neighbor switch in the first VLAN; and synchronizing forwarding information in the local multicast database with forwarding hardware of the switch.
 12. The method of claim 10, further comprising, in response to identifying the completion notification message from the second switch, terminating a timer for the second switch, wherein the timer represents a period of time the switch waits for multicast information from the second switch.
 13. The method of claim 10, further comprising constructing a second message indicating the recovery event for a third switch, wherein the switch and the third switch belong to a second VLAN distinct from a first VLAN.
 14. The method of claim 10, further comprising constructing for the second switch: a multicast notification message indicating that the switch supports advanced multicast options; and a graceful recovery notification message indicating that the switch supports construction and identification of a completion notification message.
 15. The method of claim 10, wherein the completion notification message is a Protocol-Independent Multicast (PIM) hello message, wherein the hello message includes an option type value indicating that the hello message is the completion notification message.
 16. The method of claim 10, wherein the completion notification message includes a switch identifier of the switch as a target identifier distinct from a destination address of the completion notification message.
 17. The method of claim 10, wherein the switch is a standby switch for a remote switch, and wherein the recovery event is an unavailability of the remote switch.
 18. The method of claim 18, further comprising obtaining neighbor state information from one or more synchronization messages from the remote switch, wherein the neighbor state information indicates whether a neighbor switch supports construction and identification of a completion notification message.
 19. A switch means, comprising: a multicast management means for participating in a multicast tree of a multicast group; and a graceful recovery means for: in response to determining a recovery event, constructing a message indicating the recovery event for a second switch means, wherein the switch means and the second switch means belong to a first virtual local area network (VLAN); identifying a completion notification message from the second switch means indicating a completion of replaying multicast information stored in the second switch means; and including multicast information received from the second switch means in a local multicast database.
 20. The switch means of claim 19, wherein the graceful recovery means is further for identifying a completion notification message from a respective neighbor switch means in the first VLAN; and wherein the switch means further comprises a forwarding means for synchronizing forwarding information in the local multicast database with a forwarding hardware of the switch. 